package Shape;

public class Trapezia extends Shape{
    double length1;
    double length2;
    double high;

    double length3;
    double length4;


    public Trapezia(double length1, double length2, double high) {
        this.length1 = length1;
        this.length2 = length2;
        this.high = high;
    }

    public Trapezia(double length1, double length2, double length3, double length4) {
        this.length1 = length1;
        this.length2 = length2;
        this.length3 = length3;
        this.length4 = length4;
    }

    @Override
    public double getOutline() {
        return  length1 + length2 + length3 + length4;
    }

    @Override
    public double getArea() {
        return (length1 + length2) * high / 2;
    }


}
